{"ast":null,"code":"export function leftPad(str, length) {\n  var fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';\n  var current = String(str);\n  while (current.length < length) {\n    current = \"\".concat(fill).concat(str);\n  }\n  return current;\n}\nexport var tuple = function tuple() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n  return args;\n};\nexport function toArray(val) {\n  if (val === null || val === undefined) {\n    return [];\n  }\n  return Array.isArray(val) ? val : [val];\n}\nexport default function getDataOrAriaProps(props) {\n  var retProps = {};\n  Object.keys(props).forEach(function (key) {\n    if ((key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role' || key === 'name') && key.substr(0, 7) !== 'data-__') {\n      retProps[key] = props[key];\n    }\n  });\n  return retProps;\n}\nexport function getValue(values, index) {\n  return values ? values[index] : null;\n}\nexport function updateValues(values, value, index) {\n  var newValues = [getValue(values, 0), getValue(values, 1)];\n  newValues[index] = typeof value === 'function' ? value(newValues[index]) : value;\n  if (!newValues[0] && !newValues[1]) {\n    return null;\n  }\n  return newValues;\n}","map":{"version":3,"names":["leftPad","str","length","fill","arguments","undefined","current","String","concat","tuple","_len","args","Array","_key","toArray","val","isArray","getDataOrAriaProps","props","retProps","Object","keys","forEach","key","substr","getValue","values","index","updateValues","value","newValues"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-picker/es/utils/miscUtil.js"],"sourcesContent":["export function leftPad(str, length) {\n  var fill = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '0';\n  var current = String(str);\n\n  while (current.length < length) {\n    current = \"\".concat(fill).concat(str);\n  }\n\n  return current;\n}\nexport var tuple = function tuple() {\n  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n    args[_key] = arguments[_key];\n  }\n\n  return args;\n};\nexport function toArray(val) {\n  if (val === null || val === undefined) {\n    return [];\n  }\n\n  return Array.isArray(val) ? val : [val];\n}\nexport default function getDataOrAriaProps(props) {\n  var retProps = {};\n  Object.keys(props).forEach(function (key) {\n    if ((key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role' || key === 'name') && key.substr(0, 7) !== 'data-__') {\n      retProps[key] = props[key];\n    }\n  });\n  return retProps;\n}\nexport function getValue(values, index) {\n  return values ? values[index] : null;\n}\nexport function updateValues(values, value, index) {\n  var newValues = [getValue(values, 0), getValue(values, 1)];\n  newValues[index] = typeof value === 'function' ? value(newValues[index]) : value;\n\n  if (!newValues[0] && !newValues[1]) {\n    return null;\n  }\n\n  return newValues;\n}"],"mappings":"AAAA,OAAO,SAASA,OAAO,CAACC,GAAG,EAAEC,MAAM,EAAE;EACnC,IAAIC,IAAI,GAAGC,SAAS,CAACF,MAAM,GAAG,CAAC,IAAIE,SAAS,CAAC,CAAC,CAAC,KAAKC,SAAS,GAAGD,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG;EAClF,IAAIE,OAAO,GAAGC,MAAM,CAACN,GAAG,CAAC;EAEzB,OAAOK,OAAO,CAACJ,MAAM,GAAGA,MAAM,EAAE;IAC9BI,OAAO,GAAG,EAAE,CAACE,MAAM,CAACL,IAAI,CAAC,CAACK,MAAM,CAACP,GAAG,CAAC;EACvC;EAEA,OAAOK,OAAO;AAChB;AACA,OAAO,IAAIG,KAAK,GAAG,SAASA,KAAK,GAAG;EAClC,KAAK,IAAIC,IAAI,GAAGN,SAAS,CAACF,MAAM,EAAES,IAAI,GAAG,IAAIC,KAAK,CAACF,IAAI,CAAC,EAAEG,IAAI,GAAG,CAAC,EAAEA,IAAI,GAAGH,IAAI,EAAEG,IAAI,EAAE,EAAE;IACvFF,IAAI,CAACE,IAAI,CAAC,GAAGT,SAAS,CAACS,IAAI,CAAC;EAC9B;EAEA,OAAOF,IAAI;AACb,CAAC;AACD,OAAO,SAASG,OAAO,CAACC,GAAG,EAAE;EAC3B,IAAIA,GAAG,KAAK,IAAI,IAAIA,GAAG,KAAKV,SAAS,EAAE;IACrC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